<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0039)http://sns.byr.edu.cn/cp.php?ac=profile -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta http-equiv="x-ua-compatible" content="ie=7">
<title>完善头像信息</title>
 



<link href="css/bootstrapmin.css" rel="stylesheet" media="screen">
  <link href="css/style.css" rel="stylesheet">
  
<link rel="icon" href="" type="image/x-icon" />
<link rel="shortcut icon" href="" type="image/x-icon" />
<script type="text/javascript" src="js/header.js"></script>

  
</head>

<body id="bg-img">
	
<?php
	require("header.php");
?>
<div id= "achievement">
<?php
	require("DBops.php");
	session_start();

	if(isset($_SESSION['user'])){
				$con = connect("localhost", "root", "", "lab");
				$result = query($con, "*", "personalinfo", "ID", $_SESSION['user']);
				$row = mysql_fetch_array($result);
				$ID=$_GET['id'];
				$result = query($con, "*", "personalinfo", "ID", $ID);
				$row = mysql_fetch_array($result);
	
			echo "<div style='height:30px;background:#A4D3EE;'>
		      
              <p  style='margin-right:10px;float:right;'>登录为: <a href = \"infor.php?id=".$_SESSION['user']."\">".$_SESSION['user']."</a></font>&nbsp&nbsp<a  onclick=\"if(confirm('确定要退出系统吗?')){parent.location.href ='logout.php'}\" href=\"javascript:void(0)\">退出</a></font></p></div>";
	}
	else
	{
		$_SESSION['userurl'] = $_SERVER['REQUEST_URI']; 
		echo "<div style='height:30px;background:#A4D3EE;'>
				<ul>
              <li  style='margin-right:10px;float:right;'><a href ='login.php'>登录</a></div>";
	}
	

?>


<div id="infor">


<p class="title"><img src="css/makeup/profile.gif" style="width:24px;height:24px;" >个人设置</img></p>
<div class="tabs_header">

<ul class="tabs">
<?php echo"<li class='active'>
 <a href='Makeup.php?id=$ID'><span>基本资料</span></a></li>
<li>&nbsp;&nbsp;<a href='Photo.php?id=$ID'><span>我的头像</span></a></li>";
?>

</ul>
</div>

<script type="text/javascript">
function updateavatar() {
window.location.reload();
}
</script>

<table cellspacing="0" cellpadding="0" class="formtable">
<caption>
<div class="tabs_header">
<p class="title"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;当前我的头像</b></p>
</div>
<p class="title" style="width:680px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;请上传自己照片作为个人头像来作为自己的个人头像，否则会显示默认头像。</p>
</caption>
<tr>

<td><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?php
if(isset($_SESSION['user'])&&$row['image']){
	 echo"  <img src='".$row['image']."' style='width:130px;height:180px;'>";}
	 else{echo"<img src='img/noavatar_big.gif'>";}

?>
</td>
</tr>
</table><br/>

<table cellspacing="0" cellpadding="0" class="formtable">
<caption>
<div class="tabs_header">

<p class="title"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;设置我的新头像</b></p>
</div>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;请选择一个新照片进行上传编辑。</p><br/>

<tr>
<td>
<?php
	$ID=$_GET['id'];

echo"<form action='upload.php?id=$ID' method='post' enctype='multipart/form-data'>";
?>
<label for="file"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>文件名:</strong></label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="file" name="file" id="file" />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="submit" name="submit" value="上传" />
</form>
</td>
</tr>

<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;提示：头像保存后，您可能需要刷新一下本页面(按F5键)，才能查看最新的头像效果。</td>
</tr>
</table>
<input type="hidden" name="formhash" value="983178e9" />

<br/><br/>
</div>

<body>

</body>












</body></html>
